package vn.student.mylib;

import vn.student.R;

public class ClassType {
	public static final String[] codeArr = {"CL","COU","LAB","LEC","PRA","SEM","SG"};
	public static final String[] nameArr = {"Class","Counseling","Laboratory","Lecture","Practical","Seminar","Study Group"};
	public static final int[] iconId = {R.drawable.class_icon,R.drawable.counseling,R.drawable.lab,R.drawable.lecture,R.drawable.practical,R.drawable.seminar,R.drawable.study_group};
 	public static String getCode(String name){
		for(int i=0;i<nameArr.length;i++){
			if(name.equals(nameArr[i]))
				return codeArr[i];
		}
		return null;
	}
 	public static int getIconId(String code){
		for(int i=0;i<codeArr.length;i++){
			if(code.equals(codeArr[i]))
				return iconId[i];
		}
		return iconId[0];
	}
	public static String getName(String code){
		for(int i=0;i<codeArr.length;i++){
			if(code.equals(codeArr[i]))
				return nameArr[i];
		}
		return null;
	}
}
